
<!DOCTYPE html>

<html>
  
<!-- Mirrored from docs.sympy.org/latest/tutorial/index.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:23:53 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

    <title>SymPy Tutorial &#8212; SymPy 1.9 documentation</title>
    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/default.css" />
    <link rel="stylesheet" type="text/css" href="../_static/graphviz.css" />
    <link rel="stylesheet" type="text/css" href="../_static/plot_directive.css" />
    <link rel="stylesheet" type="text/css" href="../../../live.sympy.org/static/live-core.css" />
    <link rel="stylesheet" type="text/css" href="../../../live.sympy.org/static/live-autocomplete.css" />
    <link rel="stylesheet" type="text/css" href="../../../live.sympy.org/static/live-sphinx.css" />
    
    <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
    <script src="../_static/jquery.js"></script>
    <script src="../_static/underscore.js"></script>
    <script src="../_static/doctools.js"></script>
    <script src="../../../live.sympy.org/static/utilities.js"></script>
    <script src="../../../live.sympy.org/static/external/classy.js"></script>
    <script src="../../../live.sympy.org/static/live-core.js"></script>
    <script src="../../../live.sympy.org/static/live-autocomplete.js"></script>
    <script src="../../../live.sympy.org/static/live-sphinx.js"></script>
    
    <link rel="shortcut icon" href="../_static/sympy-notailtext-favicon.ico"/>
    <link href="index.html" rel="canonical" />
    
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="Preliminaries" href="preliminaries.html" />
    <link rel="prev" title="Installation" href="../install.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="preliminaries.html" title="Preliminaries"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="../install.html" title="Installation"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">SymPy 1.9 documentation</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">SymPy Tutorial</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="sympy-tutorial">
<span id="tutorial"></span><h1>SymPy Tutorial<a class="headerlink" href="#sympy-tutorial" title="Permalink to this headline">¶</a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="preliminaries.html">Preliminaries</a><ul>
<li class="toctree-l2"><a class="reference internal" href="preliminaries.html#installation">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="preliminaries.html#exercises">Exercises</a></li>
<li class="toctree-l2"><a class="reference internal" href="preliminaries.html#about-this-tutorial">About This Tutorial</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction</a><ul>
<li class="toctree-l2"><a class="reference internal" href="intro.html#what-is-symbolic-computation">What is Symbolic Computation?</a></li>
<li class="toctree-l2"><a class="reference internal" href="intro.html#a-more-interesting-example">A More Interesting Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="intro.html#the-power-of-symbolic-computation">The Power of Symbolic Computation</a></li>
<li class="toctree-l2"><a class="reference internal" href="intro.html#why-sympy">Why SymPy?</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="gotchas.html">Gotchas</a><ul>
<li class="toctree-l2"><a class="reference internal" href="gotchas.html#symbols">Symbols</a></li>
<li class="toctree-l2"><a class="reference internal" href="gotchas.html#equals-signs">Equals signs</a></li>
<li class="toctree-l2"><a class="reference internal" href="gotchas.html#two-final-notes-and">Two Final Notes: <code class="docutils literal notranslate"><span class="pre">^</span></code> and <code class="docutils literal notranslate"><span class="pre">/</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="gotchas.html#further-reading">Further Reading</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="basic_operations.html">Basic Operations</a><ul>
<li class="toctree-l2"><a class="reference internal" href="basic_operations.html#substitution">Substitution</a></li>
<li class="toctree-l2"><a class="reference internal" href="basic_operations.html#converting-strings-to-sympy-expressions">Converting Strings to SymPy Expressions</a></li>
<li class="toctree-l2"><a class="reference internal" href="basic_operations.html#evalf"><code class="docutils literal notranslate"><span class="pre">evalf</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="basic_operations.html#lambdify"><code class="docutils literal notranslate"><span class="pre">lambdify</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="printing.html">Printing</a><ul>
<li class="toctree-l2"><a class="reference internal" href="printing.html#printers">Printers</a></li>
<li class="toctree-l2"><a class="reference internal" href="printing.html#setting-up-pretty-printing">Setting up Pretty Printing</a></li>
<li class="toctree-l2"><a class="reference internal" href="printing.html#printing-functions">Printing Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="simplification.html">Simplification</a><ul>
<li class="toctree-l2"><a class="reference internal" href="simplification.html#simplify"><code class="docutils literal notranslate"><span class="pre">simplify</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="simplification.html#polynomial-rational-function-simplification">Polynomial/Rational Function Simplification</a></li>
<li class="toctree-l2"><a class="reference internal" href="simplification.html#trigonometric-simplification">Trigonometric Simplification</a></li>
<li class="toctree-l2"><a class="reference internal" href="simplification.html#powers">Powers</a></li>
<li class="toctree-l2"><a class="reference internal" href="simplification.html#exponentials-and-logarithms">Exponentials and logarithms</a></li>
<li class="toctree-l2"><a class="reference internal" href="simplification.html#special-functions">Special Functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="simplification.html#example-continued-fractions">Example: Continued Fractions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="calculus.html">Calculus</a><ul>
<li class="toctree-l2"><a class="reference internal" href="calculus.html#derivatives">Derivatives</a></li>
<li class="toctree-l2"><a class="reference internal" href="calculus.html#integrals">Integrals</a></li>
<li class="toctree-l2"><a class="reference internal" href="calculus.html#limits">Limits</a></li>
<li class="toctree-l2"><a class="reference internal" href="calculus.html#series-expansion">Series Expansion</a></li>
<li class="toctree-l2"><a class="reference internal" href="calculus.html#finite-differences">Finite differences</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="solvers.html">Solvers</a><ul>
<li class="toctree-l2"><a class="reference internal" href="solvers.html#a-note-about-equations">A Note about Equations</a></li>
<li class="toctree-l2"><a class="reference internal" href="solvers.html#solving-equations-algebraically">Solving Equations Algebraically</a></li>
<li class="toctree-l2"><a class="reference internal" href="solvers.html#solving-differential-equations">Solving Differential Equations</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="matrices.html">Matrices</a><ul>
<li class="toctree-l2"><a class="reference internal" href="matrices.html#basic-operations">Basic Operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="matrices.html#basic-methods">Basic Methods</a></li>
<li class="toctree-l2"><a class="reference internal" href="matrices.html#matrix-constructors">Matrix Constructors</a></li>
<li class="toctree-l2"><a class="reference internal" href="matrices.html#advanced-methods">Advanced Methods</a></li>
<li class="toctree-l2"><a class="reference internal" href="matrices.html#possible-issues">Possible Issues</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="manipulation.html">Advanced Expression Manipulation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="manipulation.html#understanding-expression-trees">Understanding Expression Trees</a></li>
<li class="toctree-l2"><a class="reference internal" href="manipulation.html#recursing-through-an-expression-tree">Recursing through an Expression Tree</a></li>
<li class="toctree-l2"><a class="reference internal" href="manipulation.html#prevent-expression-evaluation">Prevent expression evaluation</a></li>
</ul>
</li>
</ul>
</div>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../index.html">
              <img class="logo" src="../_static/sympylogo.png" alt="Logo"/>
            </a></p>
  <h4>Previous topic</h4>
  <p class="topless"><a href="../install.html"
                        title="previous chapter">Installation</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="preliminaries.html"
                        title="next chapter">Preliminaries</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/tutorial/index.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="https://docs.sympy.org/latest/search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="preliminaries.html" title="Preliminaries"
             >next</a> |</li>
        <li class="right" >
          <a href="../install.html" title="Installation"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">SymPy 1.9 documentation</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">SymPy Tutorial</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2021 SymPy Development Team.
      Last updated on Sep 30, 2021.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.1.2.
    </div>
  </body>

<!-- Mirrored from docs.sympy.org/latest/tutorial/index.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:23:53 GMT -->
</html>